<template>
	<view class="content" v-if="flag">
		<view class="my">
			<view class="username" @tap='set'>
				<view>
					<image class="user" src="../static/images/aj.png"></image>
				</view>
				<view class="usermessage">
					<text>阙玉佩</text>
					<text>136******63</text>
				</view>
			</view>
			<view class="none">
				<text>未完善</text>
				<uni-icons style="color: white;" size="12" type="arrowright"></uni-icons>
			</view>
		</view>

		<view class="money">
			<view class="title">
				<view @tap="mywallet">
					<text>|</text>
					<text>我的钱包</text>
				</view>
				<view @tap="mywallet">
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<view class="wjs">
				<view>
					<text>未结算金额(元)</text>
					<text style="color: black;">56,250.00</text>
				</view>
				<view>
					<text>已结算金额(元)</text>
					<text>56,250.00</text>
				</view>
			</view>
			<border></border>

			<view class="mymsg">
				<view>
					<image lazy-load src="../static/images/icon/xx.png"></image>
					我的消息
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>

			<view class="mymsg" @tap="gotobaofei">
				<view @tao="baofei">
					<image src="../static/images/icon/money.png"></image>
					保费管理
				</view>
				<view>
					<uni-icons lazy-load type="arrowright"></uni-icons>
				</view>
			</view>

			<view class="mymsg">
				<view>
					<image lazy-load src="../static/images/icon/add.png"></image>
					我的小伙伴
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<border></border>
			<view class="mymsg">
				<view>
					<image lazy-load src="../static/images/icon/gaizhang2.png"></image>
					车险审核
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<view class="mymsg">
				<view>
					<image lazy-load src="../static/images/icon/kefu3.png"></image>
					联系客服
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<view class="mymsg" @tap='gotoset'>
				<view>
					<image lazy-load src="../static/images/icon/shezhi2.png" mode=""></image>
					设置
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import border from './border.vue'
	export default {
		data() {
			return {
				flag :true
			}
		},
		methods: {
			gotobaofei() {
				uni.navigateTo({
					url: '../baofeiguanli/baofeiguanli',
				});
			}, //保费管理
			gotoset() {
				uni.navigateTo({
					url: '../login/login'
				})
			},
			set() {
				uni.navigateTo({
					url: '../gerenxinxi/gerenxinxi'
				})
			}, //个人设置
			mywallet() {
				uni.navigateTo({
					url: '../mywallet/mywallet'
				})
			}, //我的钱包
		},
		components: {
			border: border,
		},
		onShow() {
			    const value = uni.getStorageSync('token');
				console.log(value === '')
				if(value === ''){
					// uni.reLaunch({
					// 	url:'../login/login'
					// })
					this.flag = false;
				}
		}
	}
</script>

<style scoped lang="scss">
	.mymsg {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30upx;
		box-sizing: border-box;
		width: 690upx;
		height: 100upx;
		border-bottom: 1px solid #ececec;

		image {
			width: 34upx;
			height: 34upx;
			vertical-align: -8rpx;
			margin-right: 20upx;
		}
	}

	.wjs view text:nth-child(2) {
		color: #e60012;
		font-size: 44upx;
		box-sizing: border-box;
		padding-top: 30upx;
	}

	.wjs view text:nth-child(1) {
		font-family: PingFang-SC-Regular;
		font-size: 28rpx;
		font-weight: normal;
		font-stretch: normal;
		line-height: 29rpx;
		letter-spacing: -1rpx;
		color: #999999;
	}

	.wjs view:nth-child(1) {
		border-right: 1px solid #ececec;
	}

	.wjs {
		display: flex;

		view {
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding: 60upx 80upx;
			box-sizing: border-box;
		}
	}

	.title {
		display: flex;
		height: 100upx;
		background-color: #ffffff;
		border-radius: 4upx 4upx 0upx 0upx;
		justify-content: space-between;
		border-bottom: 1px solid #ececec;
		align-items: center;
		padding: 20upx;
		box-sizing: border-box;
	}

	.title view text:nth-child(1) {
		color: red;
		margin: 0 20upx;
		font-weight: 600;
	}


	/* 我的钱包 */
	.money {
		width: 690upx;
		background-color: #ffffff;
		box-sizing: border-box;
		position: absolute;
		bottom: -910upx;
		left: 30upx;
	}

	/* 未完善 */
	.none {
		font-size: 24upx;
		color: #fffefe;
		opacity: .6;
	}

	.usermessage text:nth-child(1) {
		font-size: 38upx;
		color: #ffffff;
		font-weight: 600;
	}

	.usermessage text:nth-child(2) {
		font-size: 26upx;
		color: #ffffff;
	}

	.usermessage {
		display: flex;
		flex-direction: column;
		padding-left: 20upx;
		color: white;
	}

	.username {
		display: flex;
		align-items: center;
	}

	.my {
		display: flex;
		justify-content: space-between;
		height: 300upx;
		background: url(../static/images/my.png);
		align-items: center;
		box-sizing: border-box;
		padding: 30upx;
	}

	.user {
		width: 118upx;
		height: 118upx;
		border: solid 4px rgba(255, 255, 255, 0.3);
		border-radius: 100%;
	}

	.content {
		position: relative;
		background-color: red;
	}

	page {
		background-color: #F2F2F2;
	}
</style>
